﻿<Page x:Class="CentroVentas.Forms.Proveedor.FrmProveedorListar"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
      xmlns:extToolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit/extended"
      Background="#ECF5EB"
      Title="FrmProveedorListar"
      mc:Ignorable="d" 
      Loaded="Page_Loaded">
    <ScrollViewer>
        <extToolkit:BusyIndicator Name="Busy"
                                  IsBusy="False"
                                  BusyContent="Espere...">
            <StackPanel Orientation="Vertical">
                <Grid>
                    <TextBlock Text="Proveedores"
                               FontSize="24"
                               Margin="0,10,20,0"
                               HorizontalAlignment="Right" />
                </Grid>
                <Grid>
                    <GroupBox Header="Listado de proveedores">
                        <StackPanel Orientation="Vertical">
                            <extToolkit:WatermarkTextBox Name="txtBuscar"
                                                         Watermark="Escriba para buscar"
                                                         TextChanged="txtBuscar_TextChanged"
                                                         Margin="5"/>
                            <CheckBox Name="chkVisible"
                                      Content="Ver solo activos" 
                                      Click="chkVisible_Click"/>
                                <DataGrid Name="Grilla"
                                      Height="400"
                                      Margin="5"
                                      ItemsSource="{Binding}"
                                      CanUserAddRows="False"
                                      CanUserDeleteRows="False"
                                      CanUserReorderColumns="False"
                                      CanUserResizeColumns="False"
                                      IsReadOnly="True"
                                      SelectionMode="Single"
                                      SelectionUnit="FullRow">
                                <DataGrid.ContextMenu>
                                    <ContextMenu>
                                        <MenuItem Header="Modificar Proveedor "
                                                  Name="MenuModificarDatos"
                                                  Click="MenuModificarDatos_Click" />
                                        
                                        <MenuItem Header="Activar proveedor"
                                                  Name="ActivarProveedor"
                                                  Click="ActivarProveedor_Click"/>
                                        <MenuItem Header="Desactivar proveedor"
                                                  Name="DesactivarProveedor"
                                                  Click="DesactivarProveedor_Click" />
                                    </ContextMenu>
                                </DataGrid.ContextMenu>
                            </DataGrid>
                        </StackPanel>
                    </GroupBox>
                </Grid>
            </StackPanel>
        </extToolkit:BusyIndicator>
    </ScrollViewer>
</Page>
